
<section class="vbox" id="detail_customer">
	<header class="header bg-white b-b b-light"> <p><i class="fa fa-columns"></i> Đối chiếu conflict</p> </header>
	<section class="scrollable">
		<section class="hbox stretch">
			<aside class="col-lg-6 bg-light lter b-r">
				<section class="panel panel-success portlet-item" draggable="true">
					<header class="panel-heading">Khách hàng chính </header>
					<?php $result = $this->data["result"];?>
					<input id="cust_id" value="<?php echo $result["cust_id"]?>" type="hidden">
					<input id="cust_id_conflict" value="<?php echo $this->input->get("id")?>" type="hidden">
					<input id="data_type" value="<?php echo $this->input->get("type")?>" type="hidden">
					<div class="">
						<section class="panel no-border bg-bla lt">
							<div class="panel-body">
								<div class="clearfix text-center m-t">
									<div class="col-xs-12 text-center">
										<div class=""><!-- inline -->
										<!-- 
											<div style="width: 140px; height: 140px; line-height: 140px;margin: 0 auto;">
												<div class="thumb-lg avatar">
													<img src="/salesupport/images/avatar.png" class="dker">
												</div>
												<canvas width="140" height="140"></canvas>
											</div>

											-->
											<div class="col-xs-12 h4 m-t m-b-xs font-bold text-lt pointer  text-center" id="dt_first_name" style="padding-right: 5px;" data="cust_first_name">
												<?php echo $result["cust_first_name"]." ".$result["cust_last_name"];  ?>
											</div>

											<small class="text-muted m-b pointer " id="dt_address" data="cust_address">	
												<?php if($result["cust_address"]==""){ echo '......';}else{echo $result["cust_address"];}?>
											</small>
										</div>
									</div>
								</div>
								<div class="wrapper m-t m-b">
									<input type="hidden" id="comp_id" value="">
									<div class="row m-b">
										<div class="col-xs-6 text-right "> <small>Công ty</small>
											<div class="text-lt font-bold">
											<?php foreach($this->data["result_comp"] as $value){
													echo '<a href="'.base_url().'companies/detail?id='.$value['comp_id'].'" class=" pointer">'.$value['comp_name'].'</a><br>';
												}
											?>
											</div>

										</div>
										<div class="col-xs-6 text-left pointer "> <small>Ngày sinh</small>
											<div class="text-lt font-bold" id="dt_dob" data-type="date" data="cust_dob"><?php if($result["cust_dob"]==""){ echo '......';}else{echo $result["cust_dob"];} ?></div>
										</div>
									</div>
									<div class="row m-b">
										<div class="col-xs-6 text-right pointer "> <small>Điện thoại</small>
										<div class="text-lt font-bold " id="dt_phone" data="cust_phone"><?php if($result["cust_phone"]==""){ echo '......';}else{echo $result["cust_phone"];} ?></div>
										</div>
										<div class="col-xs-6 text-left pointer "> <small>Email</small>
											<div class="text-lt font-bold " id="dt_email" data="cust_email"><?php if($result["cust_email"]==""){ echo '......';}else{echo $result["cust_email"];} ?></div>
										</div>
									</div>

									<div class="row m-b">
										<div class="col-xs-6 text-right pointer "> <small>CMND</small>
											<div class="text-lt font-bold " id="dt_phone" data="cust_cmnd"><?php if($result["cust_cmnd"]==""){ echo '......';}else{echo $result["cust_cmnd"];} ?></div>
										</div>
										<div class="col-xs-6 text-left pointer "> <small>Ngày Cấp CMND</small>
											<div class="text-lt font-bold" id="dt_email" data="cust_cmnd_date" data-type="date"><?php if($result["cust_cmnd_date"]==""){ echo '......';}else{echo $result["cust_cmnd_date"];} ?></div>
										</div>
									</div>

									<div class="row m-b">
										<div class="col-xs-6 text-right pointer "> <small>Tài khoản ngân hàng</small>
											<div class="text-lt font-bold" id="dt_phone" data="cust_bank_account" data-type="textarea">
											<?php if($result["cust_bank_account"]==""){ echo '......';}else{echo $result["cust_bank_account"];}?>
											</div>
										</div>
										<div class="col-xs-6 text-left pointer "> <small></small>
											<div class="text-lt font-bold " id="dt_email" data="cust_cmnd_date"></div>
										</div>
									</div>
									<div class="row m-b">
										<div class="col-xs-6 col-xs-offset-3 text-center"><div><small>Sale Quản lý</small></div>
											<div class="btn-group"> 
											<span class="dropdown-toggle label bg-success"  data-toggle="dropdown"><?php echo $this->data["result_user"]["uFullname"]?> <span class="caret"></span> </span>
											<!--
											<ul class="dropdown-menu pull-right text-left"> 
												<li><a href="<?php echo base_url()?>users/detail?id=<?php echo $this->data["result_user"]["uId"]?>"><i class="fa fa-eye"></i> Xem hoạt động</a></li>

											</ul> 
													-->
											</div>
										</div>
									</div>
								</div>
							</div>
							<footer class="panel-footer dk text-center no-border">
								<div class="row pull-out">
									<div class="col-xs-4">
										<div class="padder-v"> <span class="m-b-xs h3 block text-white">---</span> <small class="text-muted"></small>
										</div>
									</div>
									<div class="col-xs-4 dker">
										<div class="padder-v"> <span class="m-b-xs h3 block text-white"><a href="#" onclick="accessChoneConflict(<?php echo $this->data["result_user"]["uId"]?>,<?php echo $result["cust_id"]?>)" class="btn btn-s-md btn-success">Cấp Quyền</a></span> <small class="text-muted"></small>
										</div>
									</div>
									<div class="col-xs-4">
										<div class="padder-v"> <span class="m-b-xs h3 block text-white">---</span> <small class="text-muted"></small>
										</div>
									</div>
								</div>
							</footer>
						</section>
					</div>
					<?php if(count($this->data["feed_result"])>0){?>
					<div class="wrapper">
						<section class="comment-list block">
							<?php 
								foreach($this->data["feed_result"] as $value){
									?>
									<article id="comment-id-3" class="comment-item">
										<a class="pull-left thumb-sm avatar">
											<img src="<?php echo base_url()?>images/un-avatar.png">
										</a> <span class="arrow left"></span>
										<section class="comment-body panel panel-default">
											<header class="panel-heading"> <a href="#"><strong><?php echo $this->data["result_user"]["uFullname"] ?></strong></a>

												gặp khách hàng <a href="<?php echo base_url()?>customer/detail?id=<?php echo $value["cust_id"]?>" title="sdasdas đâsd" class="label bg-warning m-l-xs"><?php echo $value["cust_first_name"]." ".$value["cust_last_name"]; ?></a> <span class="text-muted m-l-sm pull-right"> <i class="fa fa-clock-o"></i> <?php echo @date("d-m-Y h:i:s",$value["feed_action_time"]); ?></span>
											</header>
											<div class="panel-body">
												<div  class="col-xs-12"><?php echo $value["feed_content"]?></div>
											</div>
										</section>
									</article>
									<?php
								}
								?>
							
						</section>
						
						<?php if(count($this->data["feed_count_page"])>9){?>
						<section class="chat-list block">
								<article class="chat-item left">
									<div class="col-lg-12 text-center">
										<ul class="pagination pagination">
															<?php 
															$config['base_url'] = base_url().'conflict/review?id='.$_REQUEST["id"]."&cust";
															$config['total_rows'] = $this->data["feed_count_page"];
															$config['per_page'] = 10; 
															$config['page_query_string'] = TRUE;
															$config['full_tag_open'] = '<li>';
															$config['full_tag_close'] = '</li>';
															$config['last_tag_open'] = '<li>';
															$config['last_tag_close'] = '</li>';
															$config['next_tag_open'] = '<li>';
															$config['next_tag_close'] = '</li>';
															$config['prev_tag_open'] = '<li>';
															$config['prev_tag_close'] = '</li>';
															$config['cur_tag_open'] = '<li><a><b>';
															$config['cur_tag_close'] = '</b></a></li>';
															$config['num_tag_open'] = '<li>';
															$config['num_tag_close'] = '</li>';
															$this->pagination->initialize($config); 
															echo $this->pagination->create_links();
															?>

														</ul>
									</div>
										
								
									
								</article>
							</section>
							<?php }?>
					</div>
					<?php }?>
				</section>
			</aside>
			<aside class="col-lg-6 bg-light lter b-r">
				<section class="panel panel-warning portlet-item" draggable="true">
					<header class="panel-heading">Khách hàng conflict</header>
					<?php $result = $this->data["result_conflict"];?>
					<div class="">
						<section class="panel no-border bg-bla lt">
							<div class="panel-body">
								<div class="clearfix text-center m-t">
									<div class="col-xs-12 text-center">
										<div class=""><!-- inline -->
											<!-- 
											<div style="width: 140px; height: 140px; line-height: 140px;margin: 0 auto;">
												<div class="thumb-lg avatar">
													<img src="/salesupport/images/avatar.png" class="dker">
												</div>
												<canvas width="140" height="140"></canvas>
											</div>

											-->
											<div class="col-xs-12 h4 m-t m-b-xs font-bold text-lt pointer  text-center" id="dt_first_name" style="padding-right: 5px;" data="cust_first_name">
												<?php echo $result["cust_first_name"]." ".$result["cust_last_name"];  ?>
											</div>

											<small class="text-muted m-b pointer " id="dt_address" data="cust_address">	
												<?php if($result["cust_address"]==""){ echo '......';}else{echo $result["cust_address"];}?>
											</small>
										</div>
									</div>
								</div>
								<div class="wrapper m-t m-b">
									<input type="hidden" id="comp_id" value="">
									<div class="row m-b">
										<div class="col-xs-6 text-right "> <small>Công ty</small>
											<div class="text-lt font-bold">
											<?php foreach($this->data["result_conflict_comp"] as $value){
													echo '<a href="'.base_url().'companies/detail?id='.$value['comp_id'].'" class=" pointer">'.$value['comp_name'].'</a><br>';
												}
											?>
											</div>

										</div>
										<div class="col-xs-6 text-left pointer "> <small>Ngày sinh</small>
											<div class="text-lt font-bold" id="dt_dob" data-type="date" data="cust_dob"><?php if($result["cust_dob"]==""){ echo '......';}else{echo $result["cust_dob"];} ?></div>
										</div>
									</div>
									<div class="row m-b">
										<div class="col-xs-6 text-right pointer "> <small>Điện thoại</small>
										<div class="text-lt font-bold " id="dt_phone" data="cust_phone"><?php if($result["cust_phone"]==""){ echo '......';}else{echo $result["cust_phone"];} ?></div>
										</div>
										<div class="col-xs-6 text-left pointer "> <small>Email</small>
											<div class="text-lt font-bold " id="dt_email" data="cust_email"><?php if($result["cust_email"]==""){ echo '......';}else{echo $result["cust_email"];} ?></div>
										</div>
									</div>

									<div class="row m-b">
										<div class="col-xs-6 text-right pointer "> <small>CMND</small>
											<div class="text-lt font-bold " id="dt_phone" data="cust_cmnd"><?php if($result["cust_cmnd"]==""){ echo '......';}else{echo $result["cust_cmnd"];} ?></div>
										</div>
										<div class="col-xs-6 text-left pointer "> <small>Ngày Cấp CMND</small>
											<div class="text-lt font-bold" id="dt_email" data="cust_cmnd_date" data-type="date"><?php if($result["cust_cmnd_date"]==""){ echo '......';}else{echo $result["cust_cmnd_date"];} ?></div>
										</div>
									</div>

									<div class="row m-b">
										<div class="col-xs-6 text-right pointer "> <small>Tài khoản ngân hàng</small>
											<div class="text-lt font-bold" id="dt_phone" data="cust_bank_account" data-type="textarea">
											<?php if($result["cust_bank_account"]==""){ echo '......';}else{echo $result["cust_bank_account"];}?>
											</div>
										</div>
										<div class="col-xs-6 text-left pointer "> <small></small>
											<div class="text-lt font-bold " id="dt_email" data="cust_cmnd_date"></div>
										</div>
									</div>
									<div class="row m-b">
										<div class="col-xs-6 col-xs-offset-3 text-center"><div><small>Sale Quản lý</small></div>
											<div class="btn-group"> 
												<input id="user_id_conflict" value="<?php echo $this->data["result_conflict_user"]["uId"]?>" type="hidden">
											<span class="dropdown-toggle label bg-warning"  data-toggle="dropdown"><?php echo $this->data["result_conflict_user"]["uFullname"]?> <span class="caret"></span> </span>
										<!--
											<ul class="dropdown-menu pull-right text-left"> 
												<li><a href="<?php echo base_url()?>users/detail?id=<?php echo $this->data["result_conflict_user"]["uId"]?>"><i class="fa fa-eye"></i> Xem hoạt động</a></li>
												<li><a href="javascript:moveCustomer('<?php echo $this->data["result_conflict_user"]["uFullname"]?>',<?php echo $this->data["result_conflict_user"]["uId"]?>,<?php echo $result["cust_id"]?>)"><i class="fa fa-share"></i> Set làm sale chính</a></li>
												<li><a href="javascript:removeCustomer(<?php echo $this->data["result_conflict_user"]["uId"]?>,<?php echo $result["cust_id"]?>)"><i class="i i-trashcan"></i> Xóa</a></li>

											</ul> 
											-->
											</div>
										</div>
									</div>
								</div>
							</div>
							<footer class="panel-footer dk text-center no-border">
								<div class="row pull-out">
									<div class="col-xs-4">
										<div class="padder-v"> <span class="m-b-xs h3 block text-white">---</span> <small class="text-muted"></small>
										</div>
									</div>
									<div class="col-xs-4 dker">
										<div class="padder-v"> <span class="m-b-xs h3 block text-white"><a href="#" onclick="accessChoneConflict(<?php echo $this->data["result_conflict_user"]["uId"]?>,<?php echo $result["cust_id"]?>)" class="btn btn-s-md btn-success">Cấp Quyền</a></span> <small class="text-muted"></small>
										</div>
									</div>
									<div class="col-xs-4">
										<div class="padder-v"> <span class="m-b-xs h3 block text-white">---</span> <small class="text-muted"></small>
										</div>
									</div>
								</div>
							</footer>
						</section>
					</div>
					<?php if(count($this->data["feed_conflict_result"])>0){?>
					<div class="wrapper">
						<section class="comment-list block">
							<?php 
								foreach($this->data["feed_conflict_result"] as $value){
									?>
									<article id="comment-id-3" class="comment-item">
										<a class="pull-left thumb-sm avatar">
											<img src="<?php echo base_url()?>images/un-avatar.png">
										</a> <span class="arrow left"></span>
										<section class="comment-body panel panel-default">
											<header class="panel-heading"> <a href="#"><strong><?php echo $this->data["result_conflict_user"]["uFullname"] ?></strong></a>
												gặp khách hàng <a href="<?php echo base_url()?>customer/detail?id=<?php echo $value["cust_id"]?>" title="sdasdas đâsd" class="label bg-warning m-l-xs"><?php echo $value["cust_first_name"]." ".$value["cust_last_name"]; ?></a> <span class="text-muted m-l-sm pull-right"> <i class="fa fa-clock-o"></i> <?php echo @date("d-m-Y h:i:s",$value["feed_action_time"]); ?></span>
											</header>
											<div class="panel-body">
												<div  class="col-xs-12"><?php echo $value["feed_content"]?></div>
											</div>
										</section>
									</article>
									<?php
								}
								?>
							
						</section>
						<?php if(count($this->data["feed_conflict_count_page"])>9){
							?>
								<section class="chat-list block">
											<article class="chat-item left">
												<div class="col-lg-12 text-center">
													<ul class="pagination pagination">
																		<?php 
																		$config_cust['base_url'] = base_url().'conflict/review?id='.$_REQUEST["id"]."&cust_conflict";
																		$config_cust['total_rows'] = $this->data["feed_conflict_count_page"];
																		$config_cust['page_query_string'] = TRUE;
																		$config_cust['per_page'] = 10; 														
																		$config_cust['full_tag_open'] = '<li>';
																		$config_cust['full_tag_close'] = '</li>';
																		$config_cust['last_tag_open'] = '<li>';
																		$config_cust['last_tag_close'] = '</li>';
																		$config_cust['next_tag_open'] = '<li>';
																		$config_cust['next_tag_close'] = '</li>';
																		$config_cust['prev_tag_open'] = '<li>';
																		$config_cust['prev_tag_close'] = '</li>';
																		$config_cust['cur_tag_open'] = '<li><a><b>';
																		$config_cust['cur_tag_close'] = '</b></a></li>';
																		$config_cust['num_tag_open'] = '<li>';
																		$config_cust['num_tag_close'] = '</li>';
																		$this->pagination->initialize($config_cust); 
																		echo $this->pagination->create_links();
																		?>

																	</ul>
												</div>
													
											
												
											</article>
										</section>
					<?php 	} ?>
					
					</div>
<?php 	} ?>

				</section>
			</aside>
		</section>
	</section>
</section>